package com.zhao.dota.vo;

import cn.hutool.core.bean.BeanUtil;
import com.zhao.dota.model.MatchPlayer;
import com.zhao.dota.util.SteamUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class MatchPlayerVo extends MatchPlayer {

    private String heroAvatar;

    private String heroAvatarFull;

    public MatchPlayerVo(MatchPlayer matchPlayer) {
        BeanUtil.copyProperties(matchPlayer, this);
        this.heroAvatar = SteamUtil.getIconUrlByHeroName(super.getHeroName());
        this.heroAvatarFull = SteamUtil.getIconUrlByHeroName(super.getHeroName());
    }

}
